package Interface;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wangxin
 * Date: 2024-09-13
 * Time: 12:39
 */
public class Duck extends Animal implements IRunning,IFlying,ISwimming{
    public Duck(String name) {
        super(name);
    }

    @Override
    public void fly() {
        System.out.println(this.name + "正在天上飞");
    }

    @Override
    public void run() {
        System.out.println(this.name + "正在地上跑");

    }

    @Override
    public void swim() {
        System.out.println(this.name + "正在水上游");

    }
}
